//http请求方式
const methods = {
    DELETE: 'delete',
    GET: 'get',
    POST: 'post',
    PUT: 'put'
};

//pass相关api
const passApi = {
    login1: { path: 'login1', method: methods.POST }, // 登录
    login2: { path: 'login2', method: methods.POST }, // 登录
    passwd1: { path: 'passwd1', method: methods.POST }, // 登录
    passwd2: { path: 'passwd2', method: methods.POST }, // 登录
    change_pw1: { path: 'change_pw1', method: methods.POST }, // 登录
    change_pw2: { path: 'change_pw2', method: methods.POST }, // 登录
    edit_nickname: { path: 'api/edit_nickname', method: methods.POST }, // 登录
};

//saas相关api
//2个缩进的是后台api文档上没有的
const saasApi = {
    // ability_list: { path: 'abilitys', method: methods.GET }, // 获取全部能力列表
    // ability_create: { path: 'abilitys', method: methods.POST }, // 创建能力
    // ability_info: { path: 'abilitys/:ability_id', method: methods.GET }, // 获取指定能力
    // ability_update: { path: 'abilitys/:ability_id', method: methods.PUT }, // 更新能力
    // ability_del: { path: 'abilitys/:ability_id', method: methods.DELETE }, // 删除能力

    // address_provinces: { path: 'provinces', method: methods.GET }, // 获取省份列表
    // address_cities: { path: 'cities', method: methods.GET }, // 获取城市列表，省份参数可不传
    // address_districts: { path: 'districts', method: methods.GET }, // 获取县级列表

    // branch_create: { path: 'branches', method: methods.POST }, // 新建分店
    // branch_list: { path: 'branches', method: methods.GET }, // 获取分店列表
    // branch_info: { path: 'branches/:branch_id', method: methods.GET }, // 获取分店信息
    // branch_update: { path: 'branches/:branch_id', method: methods.PUT }, // 更新分店
    // branch_del: { path: 'branches/:branch_id', method: methods.DELETE }, // 删除分店
    // branch_update_account: { path: 'branches/:branch_id/account', method: methods.PUT }, // 更新或新建分店账户
    // branch_set_cash: { path: 'branches/:branch_id/set_cash', method: methods.PUT }, // 设置提现开关
    // branch_all: { path: 'branches/all', method: methods.GET }, // 获取所有分店
    // branch_elemeter_setting_info: { path: 'branches/:branch_id/elemeter_setting', method: methods.GET }, // 获取门店电表设置
    // branch_elemeter_setting_update: { path: 'branches/:branch_id/elemeter_setting', method: methods.PUT }, // 更新门店电表设置
    // branch_elemeter_setting_list: { path: 'branches/:branch_id/elemeter_setting/list', method: methods.GET }, // 门店按房源、房间获取列表

    // cashes: { path: 'cashes', method: methods.GET }, // 提现记录
    // cashes_export: { path: 'cashes/export', method: methods.GET }, // 导出提现记录

    // client_info: { path: 'clients/:client_id', method: methods.GET }, // 获取商户信息
    // client_update: { path: 'clients/:client_id', method: methods.PUT }, // 更新商户
    // client_phone_info: { path: 'clients/admin/phone', method: methods.GET }, // 获取商户手机号

    // clients_elemeter_setting_info: { path: 'clients/elemeter_setting', method: methods.GET }, // 获取商户电表配置
    // clients_elemeter_setting_update: { path: 'clients/elemeter_setting', method: methods.PUT }, // 更新商户电表设置
    // clients_poundage_type_update: { path: 'clients/poundage_type', method: methods.PUT }, // 更新商户手续费承担者类型
    // clients_elemeter_setting_list: { path: 'clients/elemeter_setting/list', method: methods.GET }, // 商户按门店、房源、房间获取列表

    // device_deliver: { path: 'device_deliver', method: methods.GET }, // 交付记录列表
    // device_deliver_export: { path: 'device_deliver/export', method: methods.GET }, // 交付记录列表
    // device_deliver_statistic: { path: 'device_deliver/statistic', method: methods.GET }, // 交付记录统计

    // device_update: { path: 'rooms/:room_id/devices/:device_id', method: methods.PUT }, // 修改设备信息
    // device_exception: { path: 'devices/exception', method: methods.GET }, // 异常设备报表
    // device_exception_count: { path: 'devices/exception/count', method: methods.GET }, // 异常设备数目

    // ? /rooms/:room_id/elecollectors/:ticket_id
    elecollector_create: { path: 'tickets/:ticket_id/rooms/:room_id/elecollectors', method: methods.POST }, // 新增采集器
    elecollector_del: { path: 'tickets/:ticket_id/rooms/:room_id/elecollectors/:elecollector_id', method: methods.DELETE }, // 采集器删除
    elecollector_check: { path: 'rooms/elecollectors/check', method: methods.POST }, // 采集器绑定查询
    // elecollector_info: { path: 'rooms/:room_id/elecollectors/:elecollector_id', method: methods.GET }, // 采集器详情
    // elecollector_sub_devices: { path: 'rooms/:room_id/elecollectors/:elecollector_id/sub_devices', method: methods.GET }, // 采集器关联设备

    // ?rooms/:room_id/elemeters/:ticket_id
    elemeter_create: { path: 'tickets/:ticket_id/rooms/:room_id/elemeters', method: methods.POST }, // 新增电表
    // ?rooms/:ticket_id/elemeters/:elemeter_id
    elemeter_info: { path: 'rooms/:room_id/elemeters/:elemeter_id', method: methods.GET }, // 电表详情
    // ?rooms/:room_id/elemeters/:ticket_id
    elemeter_del: { path: 'tickets/:ticket_id/rooms/:room_id/elemeters/:elemeter_id', method: methods.DELETE }, // 解绑电表
    // elemeter_reset: { path: 'rooms/:room_id/elemeters/:elemeter_id/reset', method: methods.POST }, // 单个电表清零
    // elemeters_reset: { path: 'rooms/:room_id/elemeters/reset', method: methods.POST }, // 房间电表清零
    // elemeter_charge: { path: 'rooms/:room_id/elemeters/charge', method: methods.POST }, // 电表充值
    // elemeter_overdraft: { path: 'rooms/:room_id/elemeters/overdraft/:elemeter_id', method: methods.POST }, // 电表超额
    elemeter_close: { path: 'rooms/:room_id/elemeters/:elemeter_id/off', method: methods.POST }, // 电表断电
    elemeter_open: { path: 'rooms/:room_id/elemeters/:elemeter_id/on', method: methods.POST }, // 电表通电
    // elemeter_read: { path: 'rooms/:room_id/elemeters/read', method: methods.POST }, // 电表读表
    //api文档没有
    elemeter_check: { path: 'rooms/elemeters/check', method: methods.POST }, // 电表绑定查询
    // elemeters_charge_reset: { path: 'rooms/:room_id/elemeters/charge/reset', method: methods.POST }, // 房间电表充值重置
    // elemeters_off: { path: 'rooms/:room_id/elemeters/off', method: methods.POST }, // 房间电表断电
    // elemeters_on: { path: 'rooms/:room_id/elemeters/on', method: methods.POST }, // 房间电表通电
    // elemeters_read: { path: 'rooms/:room_id/elemeters/read', method: methods.POST }, // 房间电表读电
    elemeter_gw_reg: { path: 'gw_elemeter/register_gatewaynet', method: methods.GET }, //二代电表注册网络服务
    elemeter_gw_check: { path: 'gw_elemeter/check_gatewaynet', method: methods.GET }, //检查二代电表网络服务

    // gateway_info: { path: 'rooms/:room_id/gateways/:device_id', method: methods.GET }, //获取网关基本信息
    gateway_del: { path: 'tickets/:ticket_id/rooms/:room_id/gateways/:device_id', method: methods.DELETE }, //删除网关
    gateway_add: { path: 'tickets/:ticket_id/rooms/:room_id/gateways', method: methods.POST }, //增加网关
    //api文档没有
    gateway_fetch_lqi: { path: 'rooms/:room_id/gateways/:device_id/sub_devices_lqis', method: methods.GET }, //获取门锁信号
    // gateway_restart: { path: 'rooms/:room_id/gateways/:device_id/action_restart', method: methods.PUT }, //重启网关
    // gateway_ota: { path: 'rooms/:room_id/gateways/:device_id/action_ota', method: methods.PUT }, //发起ota
    // gateway_recovery_nv: { path: 'rooms/:room_id/gateways/:device_id/action_recovery_nv', method: methods.PUT }, //恢复nv分区
    // gateway_reboot_zigbee: { path: 'rooms/:room_id/gateways/:device_id/action_reboot_zigbee', method: methods.PUT }, //重启zigbee
    // gateway_remove_repeater: { path: 'rooms/:room_id/gateways/:device_id/action_remove_repeater', method: methods.PUT }, //删除无效中继器
    // gateway_sub_devices: { path: 'rooms/:room_id/gateways/:gateway_id/sub_devices', method: methods.GET }, // 网关关联设备

    // home_list: { path: 'homes', method: methods.GET }, //获取房源列表
    // home_create: { path: 'homes', method: methods.POST }, //新建房源
    // home_update_brance: { path: 'homes/branch', method: methods.POST }, //批量更新房源所属门店
    // home_info: { path: 'homes/:home_id', method: methods.GET }, //获取房源详情
    // home_del: { path: 'homes/:home_id', method: methods.DELETE }, //删除房源
    // home_update: { path: 'homes/:home_id', method: methods.PUT }, //更新房源
    // home_elemeter_setting_info: { path: 'homes/:home_id/elemeter_setting', method: methods.GET }, //获取房源用电设置详情
    // home_elemeter_setting_update: { path: 'homes/:home_id/elemeter_setting', method: methods.PUT }, //更新房源用电设置详情
    // home_pool_setting_info: { path: 'homes/:home_id/pool_setting', method: methods.GET }, // 获取房源公摊设置详情
    // home_pool_setting_update: { path: 'homes/:home_id/pool_setting', method: methods.PUT }, // 更新房源公摊设置详情
    // home_floors: { path: 'homes/:home_id/floors', method: methods.GET }, //获取房源楼层数组
    // home_district: { path: 'homes/district', method: methods.GET }, // 获取已有房源行政区
    // home_block: { path: 'homes/block', method: methods.GET }, // 获取已有房源小区
    //api文档没有
    home_devices_info: { path: 'homes/:home_id/devices', method: methods.GET }, // 获取房源设备列表

    lock_add_no_gate: { path: 'tickets/:ticket_id/rooms/:room_id/gateless_locks', method: methods.POST }, //增加无网关门锁
    // lock_info: { path: 'rooms/:room_id/locks/:device_id', method: methods.GET }, //获取门锁基本信息
    lock_del: { path: 'tickets/:ticket_id/rooms/:room_id/locks/:device_id', method: methods.DELETE }, //删除门锁
    lock_add: { path: 'tickets/:ticket_id/rooms/:room_id/locks', method: methods.POST }, //增加门锁
    lock_bind_status: { path: 'rooms/:room_id/locks/bind_status', method: methods.GET }, //门锁绑定进度
    // lock_open_log: { path: 'rooms/:room_id/locks/:device_id/events', method: methods.GET }, //获取门锁开门记录
    // lock_restart: { path: 'rooms/:room_id/locks/:device_id/action_restart', method: methods.PUT }, //重启门锁
    //api文档没有，后端命名不规范
    lock_version_get: { path: 'lock/:sn', method: methods.GET }, //获取门锁版本号
    //api文档没有
    lock_refresh_lqis: { path: 'rooms/locks/refresh_lqis', method: methods.PUT }, //刷新门锁信号

    // mybank_accounts: { path: 'mybank/accounts', method: methods.GET }, // 获取网商银行账号
    // transfer_records: { path: 'mybank/transfer_records', method: methods.GET }, // 转账记录
    // transfer_records_export: { path:  'mybank/transfer_records/export', method: methods.GET }, // 导出转账记录

    // notifications_info: { path: 'notifications', method: methods.GET }, // 获取系统消息
    // notifications_create: { path: 'notifications', method: methods.POST }, // 添加系统消息

    // operations: { path: 'operations', method: methods.GET }, // 获取操作记录
    // operations_types: { path: 'operations/types', method: methods.GET }, // 获取操作类型

    // password_list: { path: 'rooms/:room_id/locks/:device_id/passwords', method: methods.GET }, //获取密码列表
    // password_send: { path: 'rooms/:room_id/locks/:device_id/passwords', method: methods.POST }, //下发门锁密码
    // password_send_multi: { path: 'rooms/:room_id/locks/multi_passwords', method: methods.POST }, //下发内外门锁密码（多密码下发）
    // password_send_active_multi: { path: 'rooms/:room_id/locks/multi_activation_passwords', method: methods.POST }, //下发内外门锁激活码密码（多激活码下发）
    password_dynamic: { path: 'rooms/:room_id/locks/:device_id/dynamic_passwords', method: methods.GET }, //获取动态密码
    // password_send_active: { path: 'rooms/:room_id/locks/:device_id/activation_passwords', method: methods.POST }, //下发激活码
    // password_update_active: { path: 'rooms/:room_id/locks/:device_id/activation_passwords/:password_id', method: methods.PUT }, //更新激活码
    // password_del: { path: 'rooms/:room_id/locks/:device_id/passwords/:password_id', method: methods.DELETE }, //删除密码
    // password_frozen: { path: 'rooms/:room_id/locks/:device_id/passwords/:password_id/action_frozen', method: methods.PUT }, //冻结密码
    // password_unfrozen: { path: 'rooms/:room_id/locks/:device_id/passwords/:password_id/action_unfrozen', method: methods.PUT }, //解冻密码
    // password_admin: { path: 'rooms/:room_id/locks/:device_id/admin_passwords', method: methods.GET }, //获取管理员密码
    // password_id: { path: 'leases/:lease_id/passwords', method: methods.GET }, // 获取密码id
    // password_decorate_update: { path: 'homes/:home_id/passwords/decorate_password', method: methods.PUT }, // 设置装修密码
    // password_decorate_del: { path: 'homes/:home_id/passwords/decorate_password', method: methods.DELETE }, // 清空装修密码
    //api文档没有，前端命名不规范
    password_add_test_pwd: { path: 'rooms/:room_id/locks/:device_id/test_passwords', method: methods.POST }, //有网关门锁增加测试密码

    // pay_accounts_info: { path: 'pay_accounts/info', method: methods.GET }, // 获取商户资金账户列表（包括总部，分店）
    // pay_accounts_create: { path: 'pay_accounts', method: methods.POST }, // 新增或者修改商户微信，支付宝，银行卡账号
    // pay_accounts_del: { path: 'pay_accounts', method: methods.DELETE }, // 删除商户微信，支付宝，银行卡账号

    // permission_list: { path: 'permissions', method: methods.GET }, //获取全部权限列表
    // permission_create: { path: 'permissions', method: methods.POST }, //创建权限
    // permission_info: { path: 'permissions/:permission_id', method: methods.GET }, //获取指定权限
    // permission_update: { path: 'permissions/:permission_id', method: methods.PUT }, //更新权限
    // permission_del: { path: 'permissions/:permission_id', method: methods.DELETE }, //删除权限

    // report_elemeter: { path: 'reports/elemeter_readed_amount', method: methods.GET }, //获取房间用电报表
    // report_elemeter_export: { path:  'reports/elemeter_readed_amount/action_export', method: methods.GET }, //导出房间用电报表
    // report_watermeter: { path: 'reports/watermeter_readed_amount', method: methods.GET }, //获取房间用水报表
    // report_watermeter_export: { path:  'reports/watermeter_readed_amount/action_export', method: methods.GET }, //导出房间用水报表

    // role_list: { path: 'roles', method: methods.GET }, //获取全部角色列表
    // role_create: { path: 'roles', method: methods.POST }, //创建角色
    // role_info: { path: 'roles/:role_id', method: methods.GET }, //获取指定角色
    // role_update: { path: 'roles/:role_id', method: methods.PUT }, //更新角色
    // role_del: { path: 'roles/:role_id', method: methods.DELETE }, //删除角色

    // room_list_mul_homes: { path: 'homes/rooms', method: methods.GET }, //获取多个房源的房间列表
    // room_list: { path: 'homes/:home_id/rooms', method: methods.GET }, //获取房源的房间列表
    // room_create: { path: 'homes/:home_id/rooms', method: methods.POST }, //新建多个房间
    // room_info: { path: 'rooms/:room_id', method: methods.GET }, //获取房间详情
    // room_del: { path: 'rooms/:room_id', method: methods.DELETE }, //删除房间
    // room_update: { path: 'rooms/:room_id', method: methods.PUT }, //更新房间
    // room_child_info: { path: 'rooms/:room_id/rooms', method: methods.GET }, //获取某个公区房间下的子房间
    // room_elemeter_setting: { path: 'rooms/:room_id/elemeter_setting', method: methods.GET }, //获取房间设置详情
    // room_elemeter_setting_update: { path: 'rooms/:room_id/elemeter_setting', method: methods.PUT }, //更新房间设置详情
    // room_pay_type_update: { path: 'rooms/:room_id/pay_type', method: methods.PUT }, //更新房间付费模式
    // room_overdraft_update: { path: 'rooms/:room_id/overdraft_amount', method: methods.PUT }, //更新房间透支额度
    // room_low_warn_update: { path: 'rooms/:room_id/low_warn', method: methods.PUT }, //更新房间断电提醒
    // room_ele_price_update: { path: 'rooms/:room_id/ele_price', method: methods.PUT }, //更新房间电价
    // room_charge_list: { path: 'rooms/:room_id/elemeter/charge_list', method: methods.GET }, // 获取房间充值列表
    // room_charge_list_export: { path: 'rooms/:room_id/elemeter/charge_list/export', method: methods.GET }, // 导出房间充值列表
    // room_exceptions_info: { path: 'rooms/:room_id/devices/:device_id/exceptions', method: methods.GET }, // 获取设备异常列表
    // room_electric_record: { path: 'rooms/:room_id/electric_record', method: methods.GET }, // 获取房间用电记录
    // room_elemeter_record: { path: 'rooms/:room_id/elemeters/:elemeter_id/electric_record', method: methods.GET }, // 获取电表用电记录
    // room_water_record: { path: 'rooms/:room_id/watermeters/records', method: methods.GET }, // 获取房间用水记录
    // room_water_record_export: { path: 'rooms/:room_id/watermeters/records/export', method: methods.GET }, // 导出房间用水记录
    // room_watermeter_record: { path: 'rooms/:room_id/watermeters/:watermeter_id/records', method: methods.GET }, // 获取水表用水记录
    // room_watermeter_record_export: { path: 'rooms/:room_id/watermeters/:watermeter_id/records', method: methods.GET }, // 导出水表用水记录

    // sms: { path: 'sms/client/code', method: methods.POST }, // 发送给商户短信验证码

    // team_delivery_list: { path: 'team/list', method: methods.GET }, // 交付团队列表
    // team_delivery_create: { path: 'team/create', method: methods.POST }, // 新增交付团队
    // team_delivery_update: { path: 'team/update', method: methods.PUT }, // 修改交付团队
    // team_delivery_delete: { path: 'team/delete', method: methods.DELETE }, // 删除交付团队

    // tenant_create: { path: 'tenants', method: methods.POST }, // 新建租客
    // tenant_list: { path: 'tenants', method: methods.GET }, // 获取租客列表
    // tenant_info: { path: 'tenants/:tenant_id', method: methods.GET }, // 租客详情
    // tenant_update: { path: 'tenants/:tenant_id', method: methods.PUT }, // 更新租客信息
    // tenant_del: { path: 'tenants/:tenant_id', method: methods.DELETE }, // 删除租客信息
    // tenant_checkin: { path: 'tenants/:tenant_id/rooms/:room_id', method: methods.POST }, // 入住房间
    // tenant_leases_update: { path: 'leases/:lease_id', method: methods.PUT }, // 更新租赁记录 续租
    // tenant_leases_del: { path: 'leases/:lease_id', method: methods.DELETE }, // 退租
    // tenant_co_add: { path: 'leases/:lease_id/co_tenants', method: methods.POST }, // 添加租客同租人
    // tenant_co_update: { path: 'co_tenants/:co_tenant_id', method: methods.PUT }, // 更新同租人
    // tenant_co_del: { path: 'co_tenants/:co_tenant_id', method: methods.DELETE }, // 删除同租人
    // tenant_frozen: { path: 'leases/:lease_id/frozen', method: methods.POST }, // 冻结房间
    // tenant_unfrozen: { path: 'leases/:lease_id/unfrozen', method: methods.POST }, // 解冻房间

    // tenant_orders: { path: 'tenant_orders', method: methods.GET }, // 充值记录
    // tenant_orders_export: { path: 'tenant_orders/export', method: methods.GET }, // 导出充值记录

    ticket_list: { path: 'tickets/:service_type', method: methods.GET }, // 获取工单列表
    // ticket_add: { path: 'tickets/:service_type', method: methods.POST }, // 新增工单
    ticket_info: { path: 'tickets/:ticket_id/show', method: methods.GET }, // 获取工单详细信息
    ticket_history: { path: 'tickets/:ticket_id/history', method: methods.GET }, // 获取工单历史记录
    // ticket_dispatch: { path: 'tickets/:ticket_id/dispatch_ticket', method: methods.PUT }, // 调度工单
    ticket_submit: { path: 'tickets/:ticket_id/submit_ticket', method: methods.PUT }, // 提交工单
    // ticket_close: { path: 'tickets/:ticket_id/shut_ticket', method: methods.PUT }, // 关闭工单
    // ticket_reject: { path: 'tickets/:ticket_id/reject_ticket', method: methods.PUT }, // 打回工单
    // ticket_export: { path:  'tickets/:service_type/export', method: methods.GET }, // 导出工单
    ticket_device: { path: 'tickets/:ticket_id/show_devices', method: methods.GET }, // 工单详情设备信息
    ticket_define_fault: { path: 'tickets/:ticket_id/define_fault', method: methods.PUT }, // 工单定义的错误
    ticket_define_class: { path: 'tickets/fault/:device_type', method: methods.GET }, // 工单定义的错误级别
    ticket_accept_ticket: { path: 'tickets/:ticket_id/accept_ticket', method: methods.PUT }, // 修改工单上门时间

    // tips: { path:  'tips', method: methods.GET }, // 帮助中心

    user_info: { path: 'manager/info', method: methods.GET }, // 获取个人用户信息（基本信息、角色、权限集合）
    // user_list: { path: 'users', method: methods.GET }, // 获取全部用户列表
    // user_create: { path: 'users', method: methods.POST }, // 创建用户
    // user_info_by_id: { path: 'users/:user_id', method: methods.GET }, // 获取指定用户
    // user_update: { path: 'users/:user_id', method: methods.PUT }, // 更新用户
    // user_del: { path: 'users/:user_id', method: methods.DELETE }, // 删除用户

    watergateway_create: { path: 'tickets/:ticket_id/rooms/:room_id/water_gateways', method: methods.POST }, // 绑定水表网关
    // watergateway_info: { path: 'rooms/:room_id/water_gateways/:water_gateway_id', method: methods.GET }, // 获取水表网关基本信息
    watergateway_del: { path: 'tickets/:ticket_id/rooms/:room_id/water_gateways/:water_gateway_id', method: methods.DELETE }, // 解绑水表网关
    // watergateway_update: { path: 'rooms/:room_id/water_gateways/:water_gateway_id', method: methods.PUT }, // 替换水表网关
    // water_gateway_sub_devices: { path: 'rooms/:room_id/water_gateways/:water_gateway_id/sub_devices', method: methods.GET }, // 水表网关关联设备

    watermeter_create: { path: 'tickets/:ticket_id/rooms/:room_id/watermeters', method: methods.POST }, // 绑定水表
    watermeter_bind_process: { path: 'rooms/:room_id/watermeters/bind_process', method: methods.GET }, // 查询绑定水表状态
    // watermeter_info: { path: 'rooms/:room_id/watermeters/:watermeter_id', method: methods.GET }, // 获取水表基本信息
    watermeter_del: { path: 'tickets/:ticket_id/rooms/:room_id/watermeters/:watermeter_id', method: methods.DELETE }, // 解绑水表
    // watermeter_action_read: { path: 'rooms/watermeters/:watermeter_id/read', method: methods.POST }, // 向水表发送抄表命令
};

module.exports = {
    passApi,
    saasApi
};